<template>
    <header class="header">
        <div class="logoTitle">
            <img src="@/assets/logo/logo.png" alt="" class="img" @click="toIndex">
            <!-- <img src="@/assets/logo/logoIcon1.png" alt="" class="img" @click="toIndex"> -->
            <!-- <img src="@/assets/logo/logoIcon.png" alt="" class="img" style="margin-left: 20px;" @click="toIndex"> -->
            <span class="title" @click="toIndex">国家地震灾害风险防治平台</span>
        </div>
    </header>
</template>

<script setup name="Header">
// 全局路由
const router = useRouter();
// 跳转首页
function toIndex() {
    router.push('/')
}
</script>

<style lang="scss" scoped>
.header {
    background-color: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #dddddd;
    box-shadow: 2px 2px 2px #dddddd;
    background: url("@/assets/images/headerImg.png") no-repeat center center;
    background-size: cover;
}

.logoTitle {
    margin-left: 40px;
    display: flex;
    align-items: center;

    .img {
        height: 80px;
        cursor: pointer;
    }

    .title {
        margin-left: 20px;
        // color: #107ce5;
        color: #ffffff;
        font-size: 40px;
        font-weight: bolder;
        cursor: pointer;
    }
}
</style>